package day5

object F {
  implicit class A(var b: B) {
    def test1(): Unit = {
      println("test1方法跑起来了~")
    }
    def test3(): Unit = {
      println("test3方法跑起来了~")
    }
  }
}

class B {
  def test2(): Unit = {
    println("test2方法运行了~")
  }
}

object Test8 {

  def main(args: Array[String]): Unit = {
    import F.A

    val b = new B()
    b.test2()
    b.test1()
    b.test3()
  }
}
